package com.cz.cloud.controll;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cz.cloud.dto.User;
import com.cz.cloud.service.UseFeignClient;


@RestController
public class UserConsume {
	@Autowired
	private UseFeignClient useFeignClient;

	@RequestMapping("/test")
	public String home(User user) {
		 String greeting = useFeignClient.userList(user.getUserName(),Integer.valueOf(user.getAge()));
		 return String.format("%s", greeting);
	}
}
